<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改合作商')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-partner-edit" th:object="${partner}">

        <input name="id" th:field="*{id}" type="hidden">

        <div class="form-group">
            <label class="col-sm-3 control-label is-required">合作商类型：</label>
            <div class="col-sm-8">
                <select name="subjectType" class="form-control m-b" th:with="type=${@dict.getType('sys_partner_type')}"
                        required>
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                            th:field="*{subjectType}"></option>
                </select>
            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-3 control-label is-required">合作商姓名：</label>
            <div class="col-sm-8">
                <input name="fullName" th:field="*{fullName}" class="form-control" type="text" required>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label is-required">合作商联系方式：</label>
            <div class="col-sm-8">
                <input name="phone" th:field="*{phone}" class="form-control" type="text" required>
            </div>
        </div>


        <!--<div class="form-group">-->
        <!--<label class="col-sm-3 control-label is-required">分成比例：</label>-->
        <!--<div class="col-sm-8">-->
        <!--<input name="shareRatio" th:field="*{shareRatio}" class="form-control" type="text" required>-->
        <!--</div>-->
        <!--</div>-->

        <div class="form-group">
            <label class="col-sm-3 control-label is-required">平台分润比例：</label>
            <div class="col-sm-8">
                <input name="projectShareRatio" th:field="*{projectShareRatio}" class="form-control" type="text"
                       required>
            </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea name="remarks" class="form-control">[[*{remarks}]]</textarea>
            </div>
        </div>

    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "system/partner";
    $("#form-partner-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-partner-edit').serialize());
        }
    }
</script>
</body>
</html>